/**
 * @param {number[]} nums
 * @return {number}
 */
 var findGCD = function(nums) {
  const min = Math.min(...nums)
  const max = Math.max(...nums)
  for(let i = min; i>0; i--){
    if(max % i === 0 && min % i === 0){
      return i
    }
  }

};